=========================================================================== BBS: The Abacus * HST/DS * Potterville MI Date: 06-03-93 (14:35) Number: 29 From: CALVIN FRENCH Refer#: NONE To: ALL Recvd: NO Subj: Stars Screen Saver Conf: (35) Quick Basi --------------------------------------------------------------------------- Hello all! I had said a while ago that I'd post some SB code by now, but it's not working right and I just HATE to post something that doesn't work. So here's a neat-o stars screen saver (like in windows only a little better). it's pretty realistic, at least compared to windont. '________O_/________________________| SNIP |______________________\_O_______ ' O \ | HERE | / O 'This file created by PostIt! v6.0. '>>> Start of page 1. DEFINT A-Z DIM sine(360) DIM cosine(360) DIM star.briteness(100) DIM star.angle(100) DIM star.dis(100) DIM old.star.x(100) DIM old.star.y(100) DIM star.trans.x(100) DIM star.trans.y(100) DIM star.x(100) DIM star.y(100) DIM star.speed(100) DIM star.color(100) CLS PRINT "STARS1.BAS by Calvin French. Stars-like screensaver in"+_ " Mode 13h" PRINT "Please waiting... Calculating tables: " FOR n = 0 TO 360 sine(n) = SIN(n / 57.2958) * 10 'convert radians to ' degrees cosine(n) = COS(n / 57.2958) * 10 'convert radians to ' degrees LOCATE 3, 1 PRINT n; "/ 360" NEXT n FOR n = 1 TO 50 'stars star.angle(n) = INT((360 - 1 + 1) * RND + 1) star.dis(n) = INT((1000 - 1 + 1) * RND + 1) star.speed(n) = INT((100 - 1 + 1) * RND + 1) LOCATE 22, 38 PRINT n; "/ 100 " NEXT n LOCATE 22, 1 PRINT "Done... Press any key " WHILE INKEY$ = "": WEND SCREEN 13 WINDOW (-10000, -10000)-(10000, 10000) 'because we mult. the ' sines & cosines 'by 10, this gives us ' 2000x2000 'theoretical resolution ' so to speak 'It just makes the ' variables easier 'to deal with. DO FOR n = 1 TO 50 'points star.dis(n) = star.dis(n) + star.speed(n) star.dis(n) = star.dis(n) MOD 1000 '1000 max ' distance for this one star.trans.x(n) = (cosine(star.angle(n))) -_ (sine(star.angle(n))) * star.dis(n) star.trans.y(n) = (sine(star.angle(n))) +_ (cosine(star.angle(n))) * star.dis(n) NEXT n FOR n = 1 TO 50 'points PSET (old.star.x(n), old.star.y(n)), 0 PSET (star.trans.x(n), star.trans.y(n)), star.dis(n) \_ 68 + 17 old.star.x(n) = star.trans.x(n) old.star.y(n) = star.trans.y(n) NEXT n key$ = INKEY$ IF LEN(key$) THEN GOSUB KeyPressed '>>> Continued on page 2 ... OFFLINE 1.52 "Multitask...Read in the bathroom" --- Maximus 2.01wb * Origin: RJ's Byteline =[HST/DS]= Calgary (403)247-3180 CANADA (1:134/75) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/110 159/100 125 430 575 950 203/23 209/209 SEEN-BY: 261/1023 280/1 390/1 396/1 15 397/2 2230/100 2440/5 3603/20